<template>
	<view>
		<view class="detail-part border-bottom border-top">
			<text class="title-1">{{houseDetail.projectName}}</text>
			<view class="d-flex" style="margin: 10upx 0;">
				<uni-tag v-for="(item,index) in houseDetail.tags" :key="index" :text="item" size="small" style="margin-right: 4upx;"></uni-tag>
			</view>
			<view class="d-flex flex-column">
				<view>
					<view class="detail-label">
						<text>销售状态：</text>
					</view>
					<view class="detail-content">
						<text>{{houseDetail.salesState}}</text>
					</view>
				</view>
				<view>
					<view class="detail-label">
						<text>开盘时间：</text>
					</view>
					<view class="detail-content">
						<text>{{houseDetail.openTime}}</text>
					</view>
				</view>
				<view>
					<view class="detail-label">
						<text>环线位置：</text>
					</view>
					<view class="detail-content">
						<text>{{houseDetail.circleLine}}</text>
					</view>
				</view>
				<view>
					<view class="detail-label">
						<text>楼盘地址：</text>
					</view>
					<view class="detail-content">
						<text>{{houseDetail.houseAddress}}</text>
					</view>
				</view>
			</view>
		</view>
		<view class="detail-part border-bottom">
			<text class="title-2">销售信息</text>
			<view class="d-flex flex-column">
				<view>
					<view class="detail-label">
						<text>住宅价格：</text>
					</view>
					<view class="detail-content">
						<text>{{houseDetail.housePrice}}</text>
					</view>
				</view>
				<view>
					<view class="detail-label">
						<text>楼盘总价：</text>
					</view>
					<view class="detail-content">
						<text>{{houseDetail.totalPrice}}</text>
					</view>
				</view>
				<view>
					<view class="detail-label">
						<text>售楼地址：</text>
					</view>
					<view class="detail-content">
						<text>{{houseDetail.salesAddress}}</text>
					</view>
				</view>
			</view>
		</view>
		<view class="detail-part border-bottom">
			<text class="title-2">建筑规划</text>
			<view class="d-flex flex-column">
				<view>
					<view class="detail-label">
						<text>产权年限：</text>
					</view>
					<view class="detail-content">
						<text>{{houseDetail.periodInt}}</text>
					</view>
				</view>
				<view>
					<view class="detail-label">
						<text>装修标准：</text>
					</view>
					<view class="detail-content">
						<text>{{houseDetail.decorationStandard}}</text>
					</view>
				</view>
				<view>
					<view class="detail-label">
						<text>开发商：</text>
					</view>
					<view class="detail-content">
						<text>{{houseDetail.developer}}</text>
					</view>
				</view>
				<view>
					<view class="detail-label">
						<text>绿化率：</text>
					</view>
					<view class="detail-content">
						<text>{{houseDetail.greeningRate}}</text>
					</view>
				</view>
				<view>
					<view class="detail-label">
						<text>规划用户：</text>
					</view>
					<view class="detail-content">
						<text>{{houseDetail.planningHouseholds}}</text>
					</view>
				</view>
				<view>
					<view class="detail-label">
						<text>建筑面积：</text>
					</view>
					<view class="detail-content">
						<text>{{houseDetail.lvhualv}}</text>
					</view>
				</view>
				<view>
					<view class="detail-label">
						<text>占地面积：</text>
					</view>
					<view class="detail-content">
						<text>{{houseDetail.floorArea}}</text>
					</view>
				</view>
			</view>
		</view>
		<view class="detail-part">
			<text class="title-2">物业信息</text>
			<view class="d-flex flex-column">
				<view>
					<view class="detail-label">
						<text>物业公司：</text>
					</view>
					<view class="detail-content">
						<text>{{houseDetail.propertyManagement}}</text>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import uniTag from "@/components/uni-ui/uni-tag/uni-tag.vue";
	import api from '@/common/lib/request.js';
	export default {
		data() {
			return {
				houseDetail: {}
			}
		},
		components: {
			uniTag
		},
		onLoad(options) {
			if (options.contentId) {
				this.getEstateDetail(options.contentId)
			}
		},
		methods: {
			getEstateDetail(id) {
				let _this = this;
				api.request({
						url: '/content/lpxxInfo/new',
						data: {
							contentId: id
						}
					})
					.then(response => {
						_this.houseDetail = response.content ? response.content : {};
						uni.setNavigationBarTitle({
							title: _this.houseDetail.projectName
						});
					})
					.catch(err => {
						console.log(err);
					});
			}
		}
	}
</script>

<style scoped>
	.detail-part {
		padding: 10upx 40upx;
	}

	.title-1 {
		font-size: 40upx;
		color: #262626;
		font-weight: bold;
	}

	.title-2 {
		font-size: 36upx;
		color: #262626;
		font-weight: bold;
	}

	.detail-label {
		width: 160upx;
		font-size: 32upx;
		color: #9B9B9B;
		float: left;
		/* line-height: 64upx; */
	}

	.detail-content {
		font-size: 32upx;
		color: #000000;
		width: 510upx;
		float: left;
		/* line-height: 64upx; */
	}
</style>
